Skip to content

Document .NET 11 breaking change: correctly rounded Decimal/BigInteger floating-point conversions - #55749

Open
gewarren with Copilot wants to merge 5 commits into
mainfrom
copilot/fix-decimal-bigint-conversions
Open

Document .NET 11 breaking change: correctly rounded Decimal/BigInteger floating-point conversions#55749
gewarren with Copilot wants to merge 5 commits into
mainfrom
copilot/fix-decimal-bigint-conversions

Conversation

Copilot AI commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

.NET 11 Preview 7 makes conversions between Decimal and binary floating-point types (float/double), and conversions from BigInteger to binary floating-point types, correctly rounded. Previously these conversions could truncate, round through intermediate values, or discard significant digits, producing results that differ from the true nearest representable value.

New breaking-change article

  • Added docs/core/compatibility/core-libraries/11/decimal-biginteger-floating-point-conversions.md covering previous vs. new behavior, reason for change (with links to the originating dotnet/runtime PRs), recommended action, and the full list of affected APIs.

Index and navigation

  • Added the article to docs/core/compatibility/toc.yml under Core .NET libraries → 11.
  • Added a row for it in the Core .NET libraries table in docs/core/compatibility/11.md.

Related docs

  • Added a cross-reference note in docs/csharp/language-reference/builtin-types/numeric-conversions.md where decimalfloat/double conversion behavior is described.

Example from the article illustrating the behavior change:

double value = 1.23;
decimal converted = (decimal)value;
// Previously: 1.23
// Now: 1.229999999999999982236431606 (the exact value of the double)

Internal previews

File Preview link
docs/core/compatibility/11.md Learn preview
docs/core/compatibility/core-libraries/11/decimal-biginteger-floating-point-conversions.md Learn preview
docs/core/compatibility/toc.yml Learn preview
docs/csharp/language-reference/builtin-types/numeric-conversions.md Learn preview

Build report

Copilot AI self-assigned this Aug 26, 2026
Copilot AI lite review requested due to automatic review settings August 26, 2026 15:00

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review any files in this pull request.


💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

…sions correctly rounded

Co-authored-by: gewarren <24882762+gewarren@users.noreply.github.com>
Copilot AI and others added 2 commits August 26, 2026 15:05
… list

Co-authored-by: gewarren <24882762+gewarren@users.noreply.github.com>
…erund)

Co-authored-by: gewarren <24882762+gewarren@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix correctly rounded conversions for decimal and BigInteger Document .NET 11 breaking change: correctly rounded Decimal/BigInteger floating-point conversions Aug 26, 2026
Copilot AI requested a review from gewarren August 26, 2026 15:06
Comment thread docs/csharp/language-reference/builtin-types/numeric-conversions.md Outdated
@gewarren
gewarren marked this pull request as ready for review August 26, 2026 20:24
@gewarren
gewarren requested review from a team and BillWagner as code owners August 26, 2026 20:24
@gewarren
gewarren requested a review from tannergooding August 26, 2026 20:25

@tannergooding tannergooding left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the delay! I thought I had already clicked approve on this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Breaking change]: Decimal and BigInteger floating-point conversions are correctly rounded

4 participants